{template 'header'}
<ul class="nav nav-tabs">
    <li class=""><a href="{php echo $this->createWeburl('subsection');}">打卡时间管理</a></li>
    <li class="active"><a href="{php echo $this->createWeburl('subsection', array('op' => 'addShow'));}">添加打卡时间</a></li>
</ul>
<form action="" method="post" class="form-horizontal" id="myform" role="form" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">注意事项:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12" style="color: red">
            1: 开始时间采用24小时制 <br>
            例1: 开始时间 0 结束 时间 1<br>
            例2: 开始时间 2 结束 时间 3<br>
            例3: 开始时间 4 结束 时间 5<br>
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">打卡开始时间小时:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <select name="start_time">
                {php for ($i = 1; $i < 24; $i++){}
                <option {if $subsection['start_time'] == $i}selected="selected"{/if} value="{$i}">{$i}</option>
                {php } }
            </select>点

        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">打卡结束时间小时:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <select name="end_time">
                {php for ($i = 1; $i < 24; $i++){}
                <option {if $subsection['end_time'] == $i}selected="selected"{/if} value="{$i}">{$i}</option>
                {php } }
            </select>点

        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">本次打卡获得多少币:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="currency" placeholder="本次打卡获得多少币" value="{$subsection['currency']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">简短描述:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="describe" placeholder="简短描述" value="{$subsection['describe']}" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label"></label>
        <div class="" >
            <input type="hidden" name="op" value="{php echo $id ? 'edit' : 'add'}">
            <input type="hidden" name="id" value="{$id}">
            <input type="submit" name="submit" id="submit" value="{php echo $id ? '修改' : '新增'}" class="btn btn-primary">
        </div>
    </div>
</form>
{template 'footer'}


<script>
    $(function () {
        $("input[name='type']").click(function () {
            if ( $(this).val() ==1 || $(this).val() == 3) {
                $('#appId').hide();
                $('#url').show();
            } else if ($(this).val() == 4 ) {
                $('#appId').hide();
                $('#url').hide();
            } else {
                $('#appId').show();
            }
        });
    })


</script>